package com.haiyou.data.common.persister.mysql.help.invoke;

import java.math.BigDecimal;

import com.haiyou.common.entity.Entity;
import com.haiyou.data.common.persister.mysql.help.ColumnHelper;
import com.haiyou.data.common.persister.mysql.meta.ColumnMeta;



public class DecimalHelper implements InvokeHelper {

	@Override
	public void invoke(ColumnMeta columnMeta, Object ov, Entity<?> entity) {
		BigDecimal v = (BigDecimal) ov;
		try {
			ColumnHelper.getSetter(columnMeta).invoke(entity, v);
		} catch (Exception e) {
			throw new RuntimeException(e.getMessage() + ":" + ov + ",\n" + entity + ",\n" + columnMeta, e);
		}
	}

}
